<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!-- 分页开始 -->
第${pageBean.currentPageNum }页/共${pageBean.totalPagesNum }页&nbsp;&nbsp;&nbsp;&nbsp;
<a href="${pageContext.request.contextPath }${pageBean.url}">首页</a>&nbsp;
<a href="${pageContext.request.contextPath }${pageBean.url}&currentPageNum=${pageBean.proviousPageNum}">上一页</a>&nbsp;
<c:forEach begin="${pageBean.startPageNum }" end="${pageBean.endPageNum }" var="currentPageNum">
<a href="${pageContext.request.contextPath }${pageBean.url}&currentPageNum=${currentPageNum}">${currentPageNum}</a>&nbsp;
</c:forEach>
<a href="${pageContext.request.contextPath }${pageBean.url}&currentPageNum=${pageBean.nextPageNum}">下一页</a>&nbsp;
<a href="${pageContext.request.contextPath }${pageBean.url}&currentPageNum=${pageBean.totalPagesNum}">尾页</a>&nbsp;
<input type="text" size="3" id="currentPageNum" value="" />  		
<input type="button" id="bt" value="跳转" />
<script type="text/javascript">
window.onload = function() {
	document.getElementById("bt").onclick = function() {
		var currentPageNum = document.getElementById("currentPageNum").value ;
		//验证输入是否合法
		if(!/^[1-9][0-9]*$/.test(currentPageNum)) {
			alert("请输入正确的页码！") ;
			document.getElementById("currentPageNum").value = 1 ;
			return ;
		}
		if(currentPageNum > ${pageBean.totalPagesNum }) {
			currentPageNum = ${pageBean.totalPagesNum } ;
		}
		window.location.href = "${pageContext.request.contextPath }${pageBean.url}&currentPageNum=" + currentPageNum ;
	}
}
</script>
		<!-- 分页结束 -->